logstat = false; } //nacteni objektu definice textove stranky $page_vars["URLKEY"] = $_GET["code"]; //podle $page_vars["URLKEY"] naplni objekt $textpage a z nej title, desc a reklamni bloky require_once ($server["root"]."/inc/fillpagevarinc.php"); //naplneni H3 pokud je treba $textform_vars["H3"] = $textpage->valueget("tpah3"); //kontrola zda stranka je nakesovana $tpl = new templatecached('bodytext_tpl.php', $_GET["code"]); if ($tpl->cached) { //naplneni stranky z cache $page_vars["BODY"] = $tpl->cachecontents; } else { //naplneni stranky z db a do cache if (file_exists($server["tpl_root"].'/text_'.$_GET["code"].'_tpl.php')) { $tpli = new template(); $tpli->set_vars($textform_vars, true); $pagetext_vars["PAGE_TEXT"] = $tpli->fetch('text_'.$_GET["code"].'_tpl.php'); } else { header ('Location: '.$server["url"].'/'.$keyfor404.'/'); } //naplneni body stránky $tpl->set_vars($pagetext_vars, true); $page_vars["BODY"] = $tpl->fetch('bodytext_tpl.php'); } if ($page_vars["PAGE_TITLE"] == "") { $pagebody = $page_vars["BODY"]; $posh2s = strpos($pagebody, '

') + 4; $posh2e = strpos($pagebody, '

'); $page_vars["PAGE_TITLE"] = trim(substr($pagebody, $posh2s, $posh2e - $posh2s)); } if (SERVER_CODE == SERVER_CODE_PSL) { $banner = new banner(); $page_vars["BANNER_RIGHT"] = $banner->getbannerblock(6,0,10); $page_vars["DIV_ID"] = 'pagesin'; } echo $page->getpage($page_vars); ?>